
$("#head").change(function () {
    var picTemplate = $("#picTemplate").html();
    var videoTemplate = $("#videoTemplate").html();
    var val = $(this).children('option:selected').val();
    if (val == "") {
        $("#headArea").empty();
    }
    // if (val == 1) {
    //     $("#headArea").empty();
    // }
    if (val == 2) {
        $("#headArea").empty();
        var picTemplate="<label class='col-sm-2 control-label'>图片id</label><div class='col-sm-10'><input type='title' class='form-control' id='HeadId'style='width: 70%;font-size: 25px;font-weight: bold;color: #101010;' placeholder='设置图片id'></div>";
        $("#headArea").append(picTemplate);
    }
    if (val == 3) {
        $("#headArea").empty();
        var videoTemplate="<label class='col-sm-2 control-label'>视频id</label><div class='col-sm-10'><input type='title' class='form-control' id='HeadId'style='width: 70%;font-size: 25px;font-weight: bold;color: #101010;' placeholder='设置视频id'>" +
            "<div>\n" +
            "                <label class=\"control-label\" style=\"margin-left: -15.5%;margin-top: 2%\">截帧秒</label>\n" +
            "                <input  type=\"scTime\" class=\"form-control\"\n" +
            "                       style=\"width: 20%;font-size: 25px;font-weight: bold;color: #101010;margin-top: -3.8%\" id='headScTime' placeholder=\"\">\n" +
            "            </div>" +
            "</div>";
        $("#headArea").append(videoTemplate);
    }
    if (val == 4) {
        $("#headArea").empty();
    }if (val == 5) {
        $("#headArea").empty();
        var Template=" <div class=\"form-group\" style=\"margin-top: 10px\">\n" +
            "        <label class=\"col-sm-2 control-label\">内容</label>\n" +
            "        <div class=\"col-sm-10\">\n" +
            "            <input class=\"form-control\" id=\"headTitle\"\n" +
            "                   style=\"width: 70%;font-size: 25px;font-weight: bold;color: #101010;\" placeholder=\"添加标题\">\n" +
            "        </div>\n" +
            "    </div>";
        $("#headArea").append(Template);
    }
});